@extends('layouts._order')
@section('main')
<!--End Header End-->
<div class="i_bg bg_color">
    <!--Begin 用户中心 Begin -->
	<div class="m_content">

        @include('layouts._orderleft')

        <div class="m_right" id="addres">
            <div class="m_des">
            	<table border="0" style="width:870px; line-height:22px;" cellspacing="0" cellpadding="0">
                    <tr valign="top">
                        <td width="115">
                            <img src="{{session('admin_info.user_img')}}" width="90" height="90" />
                        </td>

                        <td>
                            <div class="m_user">{{session('admin_info.user_name')}}</div>
                            <div>
                                <p style="margin-top: 7px;">积分：{{session('admin_info.integral')}}</p>
                                <p style="margin-top: 7px;"><a>我的优惠券</a>：共 @{{ count }} 张</p>
                            </div>
                        </td>
                    </tr>
                </table>
            </div>

            <div class="mem_t">账号信息</div>
            <table border="0" class="mon_tab" style="width:870px; margin-bottom:20px;" cellspacing="0" cellpadding="0">
              <tr>
                <td width="40%">用户ID：<span style="color:#555555;">{{session('admin_info.user_id')}}</span></td>
                <td width="60%">用户名：<span style="color:#555555;">{{session('admin_info.user_name')}}</span></td>
              </tr>
              <tr>
                <td>电&nbsp; &nbsp; 话：
                  <span style="color:#555555;">
                    @if(session('admin_info.user_phone'))
                      <span>{{session('admin_info.user_phone')}}</span>
                    @else
                        <span>未填写</span>
                    @endif
                  </span>
                </td>
                <td>邮&nbsp; &nbsp; 箱：<span style="color:#555555;">{{session('admin_info.user_eml')}}</span></td>
              </tr>
              <tr>
                <td>注册时间：<span style="color:#555555;">{{session('admin_info.create_time')}}</span></td>
              </tr>
            </table>
        </div>
    </div>
    <!--End Footer End -->
</div>
@endsection
@section('js')
    {{--编写js代码--}}
    <script src="{{ mix('js/app.js') }}"></script>
    <script>
        var token = "{{session('admin')}}";
        var user_id = "{{ session('admin_info.user_id') }}";
        new Vue({
            el:'#addres',
            data:{
                count:'',
            },
            methods:{},
            mounted(){
                axios({
                    method: 'get',
                    url: 'http://shopapi.cn/api/my/myWallent',
                    params:{
                        user_id:user_id,
                        token:token,
                    }
                })
                .then(
                    (res)=>{
                        this.count=res.data.data;
                        console.log(this.count);
                    }
                );
            },
        });
    </script>
@endsection
</html>


